package org.llc.flink.study.example


object List10 {
  def main(args: Array[String]): Unit = {
    val names = List("d", "mm", "dm")

    // 将List集合中的所有元素，进行扁平化操作，即把所有的元素打散
    val names2 = names.flatMap(upper)
    // names2 = List(D, D, M, M, D, M)
    println("names2 = " + names2)

  }


  def upper(str: String) = str.toUpperCase
}
